Repository navigation
CMR-11641: Reduce heap per granule umm_json search response - #2554
Open
daniel-zamora wants to merge 8 commits into
Open
daniel-zamora wants to merge 8 commits into
daniel-zamora wants to merge 8 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2554 +/- ##
==========================================
+ Coverage 54.60% 54.62% +0.02%
==========================================
Files 1049 1049
Lines 73929 73971 +42
Branches 2451 2458 +7
==========================================
+ Hits 40368 40406 +38
+ Misses 31245 31239 -6
- Partials 2316 2326 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jaortega527
reviewed
Dec 4, 2026
| (let [md5 (MessageDigest/getInstance "MD5") | ||
| sha1 (MessageDigest/getInstance "SHA-1") | ||
| length (.length text) | ||
| buffer (char-array (min length 8192))] |
Contributor
There was a problem hiding this comment.
It may be worth making the chunk length a constant instead of using a literal here.
jaortega527
reviewed
Dec 4, 2026
| (concat concept-id-revision-id-tuples [:transaction? false]))) | ||
|
|
||
| (def ^:private max-in-list-size | ||
| "Most items in one IN list." |
Contributor
There was a problem hiding this comment.
A nit, but it is a little awkward as written. Maybe Maximum number of items in one IN list.?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
What is the objective?
A
page_size=2000umm_json granule search decoded every UMM-G document into maps, re-encoded the whole page, then copied the body twice more to hash it, holding several times the response size in heap. Its metadata-db read ran every 200-granule chunk at once, each inserting into a temp table inside its own transaction, so one page took 10 Oracle sessions and 10 commits. Concurrent requests like this exhaust search heap and Oracle connections.What are the changes?
ummnow follows the stored document, so response bytes andContent-MD5/Content-SHA1values can differ from before.tookno longer includes decode time.Content-MD5andContent-SHA1are digested in chunks instead of from two full copies of the body; values are unchanged.get_concepts_work_areainside a transaction, so reads no longer generate undo, redo or commits.CMR_PARALLEL_CHUNK_THREADS(default 2) caps how many chunks one fetch reads at once. A 2000-concept fetch now holds 2 connections instead of 10; a single large page can be slightly slower.CMR_DB_MAX_POOL_SIZE(default 100) andCMR_DB_CONNECTION_WAIT_TIMEOUT(default 600 s); defaults are unchanged.oracle-lib/README.md.generic-association-test, which passed only when the post-update searches read stale index data.What areas of the application does this impact?
add-body-hashesRequired Checklist
Additional Checklist